.container {
    padding: 30px 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.demo1 {
    position: relative;
    margin: 20px auto 0;
    width: 140px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.22));
    &::before {
        content: "";
        position: absolute;
        width: 40px;
        height: 10px;
        left: calc(50% - 20px);
        top: -10px;
        border-radius: 5px 5px 0 0;
        background: #fff;
    }
    .box {
        display: flex;
        flex-direction: column-reverse;
        height: 220px;
        border-radius: 15px 15px 5px 5px;
        background: #fff;
        overflow: hidden;
    }
    .value {
        position: relative;
        width: 100%;
        background: linear-gradient(to bottom, #7abcff 0%, #00bcd4 44%, #2196f3 100%);
        /* 根据当前电量调整以下参数  */
        height: 0%;
        filter: hue-rotate(100deg);
        animation: charging1 10s linear infinite;
    }
    @keyframes charging1 {
        100% {
            height: 100%;
            filter: hue-rotate(0deg);
        }
    }
}

.demo2 {
    position: relative;
    width: 140px;
    margin: 20px auto 0;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.22));
    &::before {
        content: "";
        position: absolute;
        width: 40px;
        height: 10px;
        left: calc(50% - 20px);
        top: -10px;
        border-radius: 5px 5px 0 0;
        background: #fff;
    }
    .box {
        display: flex;
        flex-direction: column-reverse;
        height: 220px;
        border-radius: 15px 15px 5px 5px;
        background: #fff;
        overflow: hidden;
    }
    .box_remove {
        overflow: visible;
    }
    .value {
        width: 100%;
        background: linear-gradient(to bottom, #7abcff 0%, #00bcd4 44%, #2196f3 100%);
        filter: hue-rotate(100deg);
        animation: charging2 10s linear infinite;
        animation-direction: alternate;
        /* JS根据当前电量调整以下参数  */
        height: 50%;
    }

    @keyframes charging2 {
        100% {
            filter: hue-rotate(0deg);
        }
    }
    .wave {
        position: absolute;
        width: 300px;
        height: 300px;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 45% 47% 44% 42%;
        top: -280px;
        left: calc(50% - 150px);
        z-index: 1;
        animation: move1 8s linear infinite;
    }
    .wave:nth-child(2) {
        border-radius: 38% 46% 43% 47%;
        transform: rotate(-135deg);
        animation-name: move2;
    }
    .wave:nth-child(3) {
        border-radius: 42% 46% 37% 40%;
        transform: rotate(135deg);
        animation-name: move3;
    }
    @keyframes move1 {
        100% {
            transform: rotate(360deg);
        }
    }
    @keyframes move2 {
        100% {
            transform: rotate(225deg);
        }
    }
    @keyframes move3 {
        100% {
            transform: rotate(495deg);
        }
    }
    .btn {
        display: block;
        margin: 20px auto 0;
    }
}
.demo3 {
    margin: 0 auto;
    width: 400px;
    height: 200px;
    filter: blur(6px) contrast(20);
    background: #fff;
    outline: 1px solid red;
    &::before,
    &::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        box-sizing: border-box;
    }
    &::before {
        width: 120px;
        height: 120px;
        background: #333;
        top: 40px;
        left: 100px;
    }
    &::after {
        width: 80px;
        height: 80px;
        background: #3f51b5;
        top: 60px;
        left: 250px;
    }
}
.demo4 {
    position: relative;
    width: 300px;
    height: 420px;
    margin: auto;
    background: black;
    overflow: hidden;

    .number {
        position: absolute;
        width: 300px;
        top: 27%;
        text-align: center;
        font-size: 32px;
        z-index: 1;
        color: #fff;
    }
    .panel {
        position: relative;
        height: 100%;
        background-color: #000;
        filter: blur(4px) contrast(15);
        animation: change 7s infinite linear;
        animation-direction: alternate;
    }
    .circle {
        position: absolute;
        top: 20px;
        left: 0;
        right: 0;
        margin: 0 auto;
        width: 200px;
        height: 200px;
        background-color: #00ff6f;
        border-radius: 42% 38% 62% 49% / 45%;
        animation: rotate 10s infinite linear;
        &::after {
            position: absolute;
            width: 182px;
            height: 182px;
            top: 9px;
            left: 0;
            right: 0;
            margin: 0 auto;
            border-radius: 50%;
            background-color: #000;
            z-index: 1;
            content: "";
        }
    }
    .bubbles {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0 auto;
        width: 100px;
        height: 40px;
        list-style: none;
        border-radius: 100px 100px 0 0;
        background-color: #00ff6f;
        z-index: 22;
    }
    li {
        position: absolute;
        border-radius: 50%;
        background: #00ff6f;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    @for $i from 1 through 15 {
        li:nth-child(#{$i}) {
            font-size: 15 + random(4) + px;
            left: 20 + random(65) + px;
            $w: 15 + random(15) + px;
            width: $w;
            height: $w;
            animation: moveToTop 3 + random(6) + s ease-in-out -6 + random(5) + s infinite;
        }
    }
    @keyframes rotate {
        50% {
            border-radius: 45% / 42% 38% 58% 49%;
        }
        100% {
            transform: rotate(720deg);
        }
    }
    @keyframes moveToTop {
        90% {
            opacity: 1;
        }
        100% {
            opacity: 0.1;
            transform: translate(-50%, -200px);
        }
    }
    @keyframes change {
        100% {
            filter: blur(7px) contrast(20);
        }
    }
}
